// Learn TypeScript:
//  - https://docs.cocos.com/creator/manual/en/scripting/typescript.html
// Learn Attribute:
//  - https://docs.cocos.com/creator/manual/en/scripting/reference/attributes.html
// Learn life-cycle callbacks:
//  - https://docs.cocos.com/creator/manual/en/scripting/life-cycle-callbacks.html

import BaseMediator from "../../libs/lightMVC/core/base/BaseMediator";
import { Facade } from "../../libs/lightMVC/core/Facade";
import { AreaInfo } from "../model/PlayerModel";
import SelectMediator from "../select/SelectMediator";
import SelectView from "../select/SelectView";
import CatalogueView from "./ CatalogueView";

const {ccclass, property} = cc._decorator;

@ccclass
export default class CatalogueMediator extends BaseMediator {

    public view : CatalogueView;
    // LIFE-CYCLE CALLBACKS:

    // onLoad () {}

    public init(data?: any): void {

        const self = this;

       //进入下一个界面
       this.bindEvent(CatalogueView.Enter,(str: AreaInfo )=>{

            

          Facade.getInstance().openView(SelectMediator,SelectView , str);
          },this);
    }
    public viewDidAppear(): void {

        //this.view.init();
    }
    public destroy(): void {

    }
    // update (dt) {}
}
